﻿using System.Collections.Generic;
using POS.BusinessEntities;
using POS.DataObjects;

namespace POS.BusinessComponents
{
    public class BCEstacion
    {
        #region Declarations

        private readonly DOEstacion doEntity;
        private const string TempUser = "tempUser"; // TODO: Use the corresponding value
        private const int TempEmpresa = 1;         // TODO: Use the corresponding value
        private const int TempSucursal = 1;         // TODO: Use the corresponding value

        #endregion

        #region Constructors

        public BCEstacion(): this(new DOEstacion()){}

        public BCEstacion(DOEstacion doEntity)
        {
            this.doEntity = doEntity;
        }

        #endregion
        
        #region Methods: Public

        public virtual IList<BEEstacion> GetList(string filter)
        {
            return doEntity.GetList(TempEmpresa, TempSucursal, filter);
        }

        public void Save(BEEstacion estacion)
        {
            doEntity.Save(estacion, TempEmpresa, TempSucursal, TempUser);
        }

        #endregion
    }
}
